SET BITMAP FORMAT

This command will set any future bitmap created to the following format.

  Syntax
SET BITMAP FORMAT Bitmap Format Value
  Parameters
Bitmap Format Value
Integer
This value is an integer number such as 1.

  Returns

This command does not return a value.

  Description

Be aware that not all surface formats support a render target bitmap. Here are some common values you can set:

20 24-bit RGB pixel format with 8 bits per channel.
21 32-bit ARGB pixel format with alpha, using 8 bits per channel.
22 32-bit RGB pixel format, where 8 bits are reserved for each color.
23 16-bit RGB pixel format with 5 bits for red, 6 bits for green, and 5 bits for blue.
24 16-bit pixel format where 5 bits are reserved for each color.
25 16-bit pixel format where 5 bits are reserved for each color and 1 bit is reserved for alpha.
26 16-bit ARGB pixel format with 4 bits for each channel.
32 32-bit ARGB pixel format with alpha, using 8 bits per channel.
33 32-bit RGB pixel format, where 8 bits are reserved for each color.

Be aware that on some systems the default bitmap format may differ slightly between ARGB and XRGB depending on a number of factors. If you need to depend on a specific bitmap format, you should use this command at the very top of your program.

  Example Code
SET BITMAP FORMAT 21
CREATE BITMAP 1,640,480
col as DWORD
col=0x88FFFFFF
ink col,0
PRINT "text in bitmap one"
GET IMAGE 1,0,0,256,128
SET CURRENT BITMAP 0
PASTE IMAGE 1,0,0,1
PASTE IMAGE 1,2,2,1
WAIT KEY
  See also

BITMAP Commands Menu
Index